package net.topcrazy.blog.controller;

import net.topcrazy.blog.service.ArticleService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/article")
public class ArticleHandAction {
	@Autowired
	private ArticleService articleService;

	@RequestMapping(value = "/hello")
	@ResponseBody
	public String list() {
		try {
			articleService.query();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "success";
	}

	public void setArticleService(ArticleService articleService) {
		this.articleService = articleService;
	}

}
